<?php

namespace Wbi\Bundle\SocialBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Wbi\Bundle\SocialBundle\Entity\Posts
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Wbi\Bundle\SocialBundle\Entity\PostsRepository")
 */
class Posts
{
    /**
    * @ORM\ManyToOne(targetEntity="Wbi\Bundle\SocialBundle\Entity\Users")
    * @ORM\JoinColumn(nullable=false)
    */
    private $users;

   


/**
   * @ORM\OneToMany(targetEntity="Wbi\Bundle\SocialBundle\Entity\Comments", mappedBy="posts")
   */
  private $comments; // Ici commentaires prend un "s", car un article a plusieurs commentaires !

	
	/**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer $postAuthor
     *
     * @ORM\Column(name="post_author", type="bigint", nullable=false)
     */
    private $postAuthor;

    /**
     * @var \DateTime $postDate
     *
     * @ORM\Column(name="post_date", type="datetime", nullable=true)
     */
    private $postDate;

    /**
     * @var \DateTime $postDateGmt
     *
     * @ORM\Column(name="post_date_gmt", type="datetime", nullable=true)
     */
    private $postDateGmt;

    /**
     * @var string $postContent
     *
     * @ORM\Column(name="post_content", type="text")
     */
    private $postContent;

    /**
     * @var string $postTitle
     *
     * @ORM\Column(name="post_title", type="text", nullable=true)
     */
    private $postTitle;

    /**
     * @var string $postExcerpt
     *
     * @ORM\Column(name="post_excerpt", type="text", nullable=true)
     */
    private $postExcerpt;

    /**
     * @var string $postStatus
     *
     * @ORM\Column(name="post_status", type="string", length=20, nullable=true)
     */
    private $postStatus;

    /**
     * @var string $commentStatus
     *
     * @ORM\Column(name="comment_status", type="string", length=20, nullable=true)
     */
    private $commentStatus;

    /**
     * @var string $pingStatus
     *
     * @ORM\Column(name="ping_status", type="string", length=20, nullable=true)
     */
    private $pingStatus;

    /**
     * @var string $postPassword
     *
     * @ORM\Column(name="post_password", type="string", length=20, nullable=true)
     */
    private $postPassword;

    /**
     * @var string $postName
     *
     * @ORM\Column(name="post_name", type="string", length=200, nullable=true)
     */
    private $postName;

    /**
     * @var string $toPing
     *
     * @ORM\Column(name="to_ping", type="text", nullable=true)
     */
    private $toPing;

    /**
     * @var string $pinged
     *
     * @ORM\Column(name="pinged", type="text", nullable=true)
     */
    private $pinged;

    /**
     * @var \DateTime $postModified
     *
     * @ORM\Column(name="post_modified", type="datetime", nullable=true)
     */
    private $postModified;

    /**
     * @var \DateTime $postModifiedGmt
     *
     * @ORM\Column(name="post_modified_gmt", type="datetime", nullable=true)
     */
    private $postModifiedGmt;

    /**
     * @var string $postContentFiltered
     *
     * @ORM\Column(name="post_content_filtered", type="text", nullable=true)
     */
    private $postContentFiltered;

    /**
     * @var integer $postParent
     *
     * @ORM\Column(name="post_parent", type="bigint", nullable=true)
     */
    private $postParent;

    /**
     * @var string $guid
     *
     * @ORM\Column(name="guid", type="string", length=255, nullable=true)
     */
    private $guid;

    /**
     * @var integer $menuOrder
     *
     * @ORM\Column(name="menu_order", type="integer", nullable=true)
     */
    private $menuOrder;

    /**
     * @var string $postType
     *
     * @ORM\Column(name="post_type", type="string", length=20, nullable=true)
     */
    private $postType;

    /**
     * @var string $postMimeType
     *
     * @ORM\Column(name="post_mime_type", type="string", length=100, nullable=true)
     */
    private $postMimeType;

    /**
     * @var integer $commentCount
     *
     * @ORM\Column(name="comment_count", type="bigint", nullable=true)
     */
    private $commentCount;

  
    /**
     * @var string $guestName
     *
     * @ORM\Column(name="guest_name", type="string", length=45, nullable=true)
     */
    private $guestName;

    /**
     * @var string $guestEmail
     *
     * @ORM\Column(name="guest_email", type="string", length=45, nullable=true)
     */
    private $guestEmail;




    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set postAuthor
     *
     * @param integer $postAuthor
     * @return Posts
     */
    public function setPostAuthor($postAuthor)
    {
        $this->postAuthor = $postAuthor;
    
        return $this;
    }

    /**
     * Get postAuthor
     *
     * @return integer 
     */
    public function getPostAuthor()
    {
        return $this->postAuthor;
    }

    /**
     * Set postDate
     *
     * @param \DateTime $postDate
     * @return Posts
     */
    public function setPostDate($postDate)
    {
        $this->postDate = $postDate;
    
        return $this;
    }

    /**
     * Get postDate
     *
     * @return \DateTime 
     */
    public function getPostDate()
    {
        return $this->postDate;
    }

    /**
     * Set postDateGmt
     *
     * @param \DateTime $postDateGmt
     * @return Posts
     */
    public function setPostDateGmt($postDateGmt)
    {
        $this->postDateGmt = $postDateGmt;
    
        return $this;
    }

    /**
     * Get postDateGmt
     *
     * @return \DateTime 
     */
    public function getPostDateGmt()
    {
        return $this->postDateGmt;
    }

    /**
     * Set postContent
     *
     * @param string $postContent
     * @return Posts
     */
    public function setPostContent($postContent)
    {
        $this->postContent = $postContent;
    
        return $this;
    }

    /**
     * Get postContent
     *
     * @return string 
     */
    public function getPostContent()
    {
        return $this->postContent;
    }

    /**
     * Set postTitle
     *
     * @param string $postTitle
     * @return Posts
     */
    public function setPostTitle($postTitle)
    {
        $this->postTitle = $postTitle;
    
        return $this;
    }

    /**
     * Get postTitle
     *
     * @return string 
     */
    public function getPostTitle()
    {
        return $this->postTitle;
    }

    /**
     * Set postExcerpt
     *
     * @param string $postExcerpt
     * @return Posts
     */
    public function setPostExcerpt($postExcerpt)
    {
        $this->postExcerpt = $postExcerpt;
    
        return $this;
    }

    /**
     * Get postExcerpt
     *
     * @return string 
     */
    public function getPostExcerpt()
    {
        return $this->postExcerpt;
    }

    /**
     * Set postStatus
     *
     * @param string $postStatus
     * @return Posts
     */
    public function setPostStatus($postStatus)
    {
        $this->postStatus = $postStatus;
    
        return $this;
    }

    /**
     * Get postStatus
     *
     * @return string 
     */
    public function getPostStatus()
    {
        return $this->postStatus;
    }

    /**
     * Set commentStatus
     *
     * @param string $commentStatus
     * @return Posts
     */
    public function setCommentStatus($commentStatus)
    {
        $this->commentStatus = $commentStatus;
    
        return $this;
    }

    /**
     * Get commentStatus
     *
     * @return string 
     */
    public function getCommentStatus()
    {
        return $this->commentStatus;
    }

    /**
     * Set pingStatus
     *
     * @param string $pingStatus
     * @return Posts
     */
    public function setPingStatus($pingStatus)
    {
        $this->pingStatus = $pingStatus;
    
        return $this;
    }

    /**
     * Get pingStatus
     *
     * @return string 
     */
    public function getPingStatus()
    {
        return $this->pingStatus;
    }

    /**
     * Set postPassword
     *
     * @param string $postPassword
     * @return Posts
     */
    public function setPostPassword($postPassword)
    {
        $this->postPassword = $postPassword;
    
        return $this;
    }

    /**
     * Get postPassword
     *
     * @return string 
     */
    public function getPostPassword()
    {
        return $this->postPassword;
    }

    /**
     * Set postName
     *
     * @param string $postName
     * @return Posts
     */
    public function setPostName($postName)
    {
        $this->postName = $postName;
    
        return $this;
    }

    /**
     * Get postName
     *
     * @return string 
     */
    public function getPostName()
    {
        return $this->postName;
    }

    /**
     * Set toPing
     *
     * @param string $toPing
     * @return Posts
     */
    public function setToPing($toPing)
    {
        $this->toPing = $toPing;
    
        return $this;
    }

    /**
     * Get toPing
     *
     * @return string 
     */
    public function getToPing()
    {
        return $this->toPing;
    }

    /**
     * Set pinged
     *
     * @param string $pinged
     * @return Posts
     */
    public function setPinged($pinged)
    {
        $this->pinged = $pinged;
    
        return $this;
    }

    /**
     * Get pinged
     *
     * @return string 
     */
    public function getPinged()
    {
        return $this->pinged;
    }

    /**
     * Set postModified
     *
     * @param \DateTime $postModified
     * @return Posts
     */
    public function setPostModified($postModified)
    {
        $this->postModified = $postModified;
    
        return $this;
    }

    /**
     * Get postModified
     *
     * @return \DateTime 
     */
    public function getPostModified()
    {
        return $this->postModified;
    }

    /**
     * Set postModifiedGmt
     *
     * @param \DateTime $postModifiedGmt
     * @return Posts
     */
    public function setPostModifiedGmt($postModifiedGmt)
    {
        $this->postModifiedGmt = $postModifiedGmt;
    
        return $this;
    }

    /**
     * Get postModifiedGmt
     *
     * @return \DateTime 
     */
    public function getPostModifiedGmt()
    {
        return $this->postModifiedGmt;
    }

    /**
     * Set postContentFiltered
     *
     * @param string $postContentFiltered
     * @return Posts
     */
    public function setPostContentFiltered($postContentFiltered)
    {
        $this->postContentFiltered = $postContentFiltered;
    
        return $this;
    }

    /**
     * Get postContentFiltered
     *
     * @return string 
     */
    public function getPostContentFiltered()
    {
        return $this->postContentFiltered;
    }

    /**
     * Set postParent
     *
     * @param integer $postParent
     * @return Posts
     */
    public function setPostParent($postParent)
    {
        $this->postParent = $postParent;
    
        return $this;
    }

    /**
     * Get postParent
     *
     * @return integer 
     */
    public function getPostParent()
    {
        return $this->postParent;
    }

    /**
     * Set guid
     *
     * @param string $guid
     * @return Posts
     */
    public function setGuid($guid)
    {
        $this->guid = $guid;
    
        return $this;
    }

    /**
     * Get guid
     *
     * @return string 
     */
    public function getGuid()
    {
        return $this->guid;
    }

    /**
     * Set menuOrder
     *
     * @param integer $menuOrder
     * @return Posts
     */
    public function setMenuOrder($menuOrder)
    {
        $this->menuOrder = $menuOrder;
    
        return $this;
    }

    /**
     * Get menuOrder
     *
     * @return integer 
     */
    public function getMenuOrder()
    {
        return $this->menuOrder;
    }

    /**
     * Set postType
     *
     * @param string $postType
     * @return Posts
     */
    public function setPostType($postType)
    {
        $this->postType = $postType;
    
        return $this;
    }

    /**
     * Get postType
     *
     * @return string 
     */
    public function getPostType()
    {
        return $this->postType;
    }

    /**
     * Set postMimeType
     *
     * @param string $postMimeType
     * @return Posts
     */
    public function setPostMimeType($postMimeType)
    {
        $this->postMimeType = $postMimeType;
    
        return $this;
    }

    /**
     * Get postMimeType
     *
     * @return string 
     */
    public function getPostMimeType()
    {
        return $this->postMimeType;
    }

    /**
     * Set commentCount
     *
     * @param integer $commentCount
     * @return Posts
     */
    public function setCommentCount($commentCount)
    {
        $this->commentCount = $commentCount;
    
        return $this;
    }

    /**
     * Get commentCount
     *
     * @return integer 
     */
    public function getCommentCount()
    {
        return $this->commentCount;
    }

  
  

    /**
     * Set guestName
     *
     * @param string $guestName
     * @return Posts
     */
    public function setGuestName($guestName)
    {
        $this->guestName = $guestName;
    
        return $this;
    }

    /**
     * Get guestName
     *
     * @return string 
     */
    public function getGuestName()
    {
        return $this->guestName;
    }

    /**
     * Set guestEmail
     *
     * @param string $guestEmail
     * @return Posts
     */
    public function setGuestEmail($guestEmail)
    {
        $this->guestEmail = $guestEmail;
    
        return $this;
    }

    /**
     * Get guestEmail
     *
     * @return string 
     */
    public function getGuestEmail()
    {
        return $this->guestEmail;
    }

        
	
	/**
     * Set users
     *
     * @param Wbi\Bundle\SocialBundle\Entity\Users $users
     */
    public function setUsers(\Wbi\Bundle\SocialBundle\Entity\Users $users)
    {
        $this->users = $users;
    }

    /**
     * Get users
     *
     * @return Wbi\Bundle\SocialBundle\Entity\Users
     */
    public function getUsers()
    {
        return $this->users;
    }
    
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->comments = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add comments
     *
     * @param Wbi\Bundle\SocialBundle\Entity\Comments $comments
     * @return Posts
     */
    public function addComment(\Wbi\Bundle\SocialBundle\Entity\Comments $comments)
    {
        $this->comments[] = $comments;
        $comments->setPosts($this);
        return $this;
    }

    /**
     * Remove comments
     *
     * @param Wbi\Bundle\SocialBundle\Entity\Comments $comments
     */
    public function removeComment(\Wbi\Bundle\SocialBundle\Entity\Comments $comments)
    {
        $this->comments->removeElement($comments);
        $comments->setPosts(null);
    }

    /**
     * Get comments
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getComments()
    {
        return $this->comments;
    }

   
}